home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mac Magazin/MacEasy 19
/
Mac Magazin and MacEasy Magazine CD - Issue 19.iso
/
Grafik & Text & Film
/
Quark XTensions
/
Freeware Xtensions
/
Quark AppleScript Scripts
/
Scripts (text only)
/
Set Page Guides
< prev
next >
Wrap
Text File
|
1994-05-02
|
2KB
|
65 lines
--Copyright 1994 Quark, Inc. All rights reserved.
tell application "QuarkXPress™"
activate
if exists (document 1) then
repeat
tell document 1
set pgcnt to count of pages
set x to false
set y to false
repeat until x is true
if pgcnt > 1 then
display dialog " Set Page Guides
There are " & pgcnt & " pages in this document.
Apply guide to page:" default answer 1
else
display dialog " Set Page Guides
There is " & pgcnt & " page in this document.
Apply guide to page:" default answer 1
end if
try
set pgnum to text returned of result as integer
if pgnum ≤ pgcnt and pgnum ≥ 1 then
set x to true
end if
on error
set x to false
end try
end repeat
tell page pgnum
repeat until y is true
set gdprp to display dialog "Place guide at:" default answer "" buttons {"Horizontal", "Vertical"}
set gdpl to text returned of gdprp
try
if button returned of gdprp = "Horizontal" then
make horizontal guide at beginning with properties {position:gdpl}
set y to true
else if button returned of gdprp = "Vertical" then
make vertical guide at beginning with properties {position:gdpl}
set y to true
end if
on error errtext number errNum
if errNum = -1702 then
display dialog "" & errtext with icon stop
else
display dialog "Improper number or measurement." with icon stop
end if
set y to false
end try
end repeat
end tell
end tell
end repeat
else
display dialog "Please open a QuarkXPress™ document before running this script." buttons {"Cancel"} ¬
default button 1 with icon stop
end if
end tell